/** 
* Copyright (C) 2012-2017 ZEEI Inc.All Rights Reserved.
* 项目名称：pls
* 文件名称：AppVersionServiceImpl.java
* 包  名  称：com.zeei.pls.service.impl
* 文件描述：TODO 请修改文件描述
* 创建日期：2017年12月14日下午3:13:20
* 
* 修改历史
* 1.0 chenhuiqiong 2017年12月14日下午3:13:20 创建文件
*
*/


package com.zeei.app.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageInfo;
import com.zeei.app.dao.AppVersionDao;
import com.zeei.app.service.AppVersionService;
import com.zeei.app.vo.AppVersionVO;
import com.zeei.common.vo.PageParamVO;

/** 
* 类型名称：AppVersionServiceImpl
* 类型描述：APP版本信息管理
* 功能描述：APP版本信息管理
* 创建作者：chenhuiqiong
*
*/
@Service("appVersionService")
public class AppVersionServiceImpl implements AppVersionService {
	@Autowired
	private AppVersionDao appVersionDao;
	
	/* (non-Javadoc)
	 * @see com.zeei.pls.service.AppVersionService#queryAppVersion(com.zeei.pls.vo.AppVersionVO, com.zeei.common.vo.PageParamVO, boolean)
	 */
	@Override
	public PageInfo<AppVersionVO> queryAppVersion(AppVersionVO appVersionVO, PageParamVO pageParam, boolean isPage) {
		if(isPage){
			pageParam.setPageInfo(pageParam.getPage(), pageParam.getRows());
		}
		List<AppVersionVO> appVersionList = appVersionDao.queryAppVersion(appVersionVO);
		return new PageInfo<AppVersionVO>(appVersionList);
	}

	/* (non-Javadoc)
	 * @see com.zeei.pls.service.AppVersionService#insertAppVersion(com.zeei.pls.vo.AppVersionVO)
	 */
	@Override
	public boolean insertAppVersion(AppVersionVO appVersionVO) {
		appVersionVO.setCreateTime(new Date());
		return appVersionDao.insertAppVersion(appVersionVO) > 0;
	}

	/* (non-Javadoc)
	 * @see com.zeei.pls.service.AppVersionService#updateAppVersion(com.zeei.pls.vo.AppVersionVO)
	 */
	@Override
	public boolean updateAppVersion(AppVersionVO appVersionVO) {
		return appVersionDao.updateAppVersion(appVersionVO) > 0;
	}

	/* (non-Javadoc)
	 * @see com.zeei.pls.service.AppVersionService#deleteAppVersion(com.zeei.pls.vo.AppVersionVO)
	 */
	@Override
	public boolean deleteAppVersion(AppVersionVO appVersionVO) {
		return appVersionDao.deleteAppVersion(appVersionVO) > 0;
	}

}

